/*
 * @Description: 
 * @Version: 1.0
 * @Author: MapleLeaf
 * @Date: 2021-05-22 14:31:44
 * @LastEditors: MapleLeaf
 * @LastEditTime: 2021-05-22 14:31:57
 */
import { createStore } from 'vuex'
const store = createStore({
  state: {
    langPicker: false,
    loading: false
  },
  mutations: {
    // 语言选择框
    handleShowPicker(state) {
      state.langPicker = !state.langPicker
    },
    // 显示loading
    showLoading(state) {
      state.loading = true
    },
    // 隐藏loading
    hideLoading(state) {
      state.loading = false
    }
  },
  getters: {
    langPicker: (state) => state.langPicker
  },
  actions: {
    changeShowPicker(context, value) {
      context.commit('handleShowPicker', value)
    }
  },
  modules: {}
})

export default store